<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <meta charset="UTF-8">
    <!--  CSRF  -->
    <meta name="_csrf" th:content="${_csrf.token}"/>
    <!--  default header name is X-CSRF-TOKEN  -->
    <meta name="_csrf_header" th:content="${_csrf.headerName}"/>
    <!--  CSRF  -->
    <title>Title</title>
</head>
<body>
<form class="form-horizontal" th:action= "@{/admin/permission/add}" method="post">
    <div class="form-group">
        <label for="name" class="col-sm-2 control-label">权限名称</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" id="name" name="name" placeholder="name">
        </div>
    </div>

    <div class="form-group">
        <label for="resource_type" name="resource_type" class="col-sm-2 control-label">权限类型</label>
        <div class="col-sm-10">
            <select name="resourceType" id="" class="form-control">
                <option value="menu">菜单</option>
                <option value="button">按钮</option>
            </select>
        </div>
    </div>

    <div class="form-group">
        <label for="name" class="col-sm-2 control-babel">URL</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" id="url" name="url" placeholder="url">
        </div>
    </div>

    <div class="form-group">
        <label for="" class="col-sm-2 control-label">角色</label>
        <div class="col-sm-10">
            <select name="role" class="form-control">
                <option th:each="sysRole:${sysRole}" th:text="${sysRole.cnname}" th:value="${sysRole.role}"></option>
            </select>
        </div>
    </div>

    <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}">

    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <input type="submit" value="提交" class="btn btn-info">
            &nbsp;&nbsp;&nbsp;
            <input type="reset" value="重置" class="btn btn-info">
        </div>
    </div>
</form>
</body>
</html>